﻿using JT808Protocol.Abstracts;
using System.Collections.Generic;

namespace JT808Gateway.Core.Extensions
{
    /// <summary>
    /// JT808网关配置
    /// </summary>
    public class JT808GatewayOptions
    {
        public JT808GatewayOptions()
        {
            GatewayServer = new GatewayServerInfo();
            AttachmentServer = new AttachmentServerInfo();
            Forwarders = new List<IDataForwarder>();
        }

        /// <summary>
        /// 网关宿主配置
        /// </summary>
        public GatewayServerInfo GatewayServer { get; set; }

        /// <summary>
        /// 附件服务器配置
        /// </summary>
        public AttachmentServerInfo AttachmentServer { get; set; }

        /// <summary>
        /// 转发器集合
        /// </summary>
        public List<IDataForwarder> Forwarders { get; set; }
    }

    /// <summary>
    /// 网关信息
    /// </summary>
    public class GatewayServerInfo
    {
        /// <summary>
        /// 主机
        /// </summary>
        public string Host { get; set; }

        /// <summary>
        /// 端口
        /// </summary>
        public int Port { get; set; }
    }

    /// <summary>
    /// 附件服务器信息
    /// </summary>
    public class AttachmentServerInfo
    {
        public string IP { get; set; }

        public int Port { get; set; }
    }
}